package com.example.medicalequipment.entity;

import androidx.room.Entity;
import androidx.room.PrimaryKey;

@Entity(tableName = "medical_device")
public class MedicalDevice {
    @PrimaryKey(autoGenerate = true)
    private int id;
    private String name;
    private String department;
    private int imageResId;
    private String code;
    private String function;
    private String introduction;
    private String faultDescription; // 故障描述
    private String reporter; // 报修人
    private long reportTime; // 报修时间
    private int status; // 维修状态：0-待处理，1-处理中，2-已完成

    // 构造函数
    public MedicalDevice(String name, String department, int imageResId, String code,
                         String function, String introduction, String faultDescription,
                         String reporter, long reportTime, int status) {
        this.name = name;
        this.department = department;
        this.imageResId = imageResId;
        this.code = code;
        this.function = function;
        this.introduction = introduction;
        this.faultDescription = faultDescription;
        this.reporter = reporter;
        this.reportTime = reportTime;
        this.status = status;
    }

    // Getters and Setters
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public int getImageResId() {
        return imageResId;
    }

    public void setImageResId(int imageResId) {
        this.imageResId = imageResId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getFunction() {
        return function;
    }

    public void setFunction(String function) {
        this.function = function;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public String getFaultDescription() {
        return faultDescription;
    }

    public void setFaultDescription(String faultDescription) {
        this.faultDescription = faultDescription;
    }

    public String getReporter() {
        return reporter;
    }

    public void setReporter(String reporter) {
        this.reporter = reporter;
    }

    public long getReportTime() {
        return reportTime;
    }

    public void setReportTime(long reportTime) {
        this.reportTime = reportTime;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }
}
